﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Media;
using System.ComponentModel;

namespace BlueMarble.Genesis.Infrastructure.Background.Dynamic
{
    public class BackgroundLayer : Canvas, INotifyPropertyChanged
    {
        public BackgroundLayer()
        {
        }

        public Brush BackgroundLayerBrush
        {
            get { return (Brush)GetValue(BackgroundLayerBrushProperty); }
            set { SetValue(BackgroundLayerBrushProperty, value); }
        }

        // Using a DependencyProperty as the backing store for BackgroundLayerBrush.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty BackgroundLayerBrushProperty =
            DependencyProperty.Register("BackgroundLayerBrush", typeof(Brush), typeof(BackgroundLayer), new PropertyMetadata(null));

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler Handler = PropertyChanged;
            if (Handler != null) Handler(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion
    }
}
